<html>
<head><meta charset="utf-8"><title>rebuild llvm · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html">rebuild llvm</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="164489551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/164489551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#164489551">(Apr 29 2019 at 21:16)</a>:</h4>
<p>I'm investigating a stack overflow in LLVM that I see on rust-lang/rust master for a specific test when debuginfo is enabled. How can I get LLVM to be rebuilt with x.py?</p>



<a name="164489843"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/164489843" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#164489843">(Apr 29 2019 at 21:20)</a>:</h4>
<p>I think there's some timestamp/lockfile in <code>build/x86_...../llvm</code> that you can remove</p>



<a name="164489886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/164489886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#164489886">(Apr 29 2019 at 21:21)</a>:</h4>
<p><code>rm build/x86_64-unknown-linux-gnu/llvm/llvm-finished-building</code> did the trick, thanks <span class="user-mention" data-user-id="124288">@oli</span>.</p>



<a name="168117902"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168117902" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168117902">(Jun 14 2019 at 08:47)</a>:</h4>
<p>is there an option to <code>x.py</code> to expose this? We may want to add one. (That or I guess people can be like me and resort to <code>rm -rf</code>'ing <code>build/</code> after tearing their hair out for a while.)</p>



<a name="168117990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168117990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168117990">(Jun 14 2019 at 08:48)</a>:</h4>
<blockquote>
<p>(That or I guess people can be like me and resort to rm -rf'ing build/ after tearing their hair out for a while.)</p>
</blockquote>
<p>I do this also and feel very sad about it every time...</p>



<a name="168118093"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118093" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118093">(Jun 14 2019 at 08:50)</a>:</h4>
<p>how exposed do you want it? have <code>./x.py clean</code> always clear the <code>llvm-finished-building</code> file, but also have a flag to not do that?</p>



<a name="168118103"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118103" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118103">(Jun 14 2019 at 08:50)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> <code>./x.py clean --nuclear-option</code></p>



<a name="168118113"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118113" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118113">(Jun 14 2019 at 08:50)</a>:</h4>
<p>the nuclear option is to <code>rm build</code></p>



<a name="168118146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118146">(Jun 14 2019 at 08:51)</a>:</h4>
<p><code>./x.py clean --llvm</code> then</p>



<a name="168118148"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118148" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118148">(Jun 14 2019 at 08:51)</a>:</h4>
<p>wait, you're saying <code>x.py clean</code> <em>does</em> clear the <code>llvm-finished-building</code> file?</p>



<a name="168118149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118149">(Jun 14 2019 at 08:51)</a>:</h4>
<p>no</p>



<a name="168118150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118150">(Jun 14 2019 at 08:51)</a>:</h4>
<p>it could</p>



<a name="168118153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118153">(Jun 14 2019 at 08:51)</a>:</h4>
<p>ah I see</p>



<a name="168118191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118191">(Jun 14 2019 at 08:52)</a>:</h4>
<p>no I think we want to preserve the current behavior</p>



<a name="168118198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118198">(Jun 14 2019 at 08:52)</a>:</h4>
<p>like I'm wondering if doing so by default would make more sense</p>



<a name="168118208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118208">(Jun 14 2019 at 08:52)</a>:</h4>
<p>I think <code>x.py clean --and-clean-llvm</code> would be good</p>



<a name="168118209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118209">(Jun 14 2019 at 08:52)</a>:</h4>
<p>ok, then I'll have <code>./x.py clean</code> also emit a message about llvm not getting cleaned</p>



<a name="168118219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118219">(Jun 14 2019 at 08:52)</a>:</h4>
<p>together with a suggestion for <code>--and-clean-llvm</code></p>



<a name="168118225"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118225" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118225">(Jun 14 2019 at 08:52)</a>:</h4>
<p>(or at least, that would generalize to any other submodules that similarly leave products around post-clean)</p>



<a name="168118249"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118249" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118249">(Jun 14 2019 at 08:53)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span>  <code>clean --and-clean-llvm</code> seems awfully wordy and repetitive</p>



<a name="168118256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118256">(Jun 14 2019 at 08:53)</a>:</h4>
<p>is that on purpose? :P</p>



<a name="168118257"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118257" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118257">(Jun 14 2019 at 08:53)</a>:</h4>
<p>yeah but <code>x.py clean --llvm</code> is ambiguous to me</p>



<a name="168118260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118260">(Jun 14 2019 at 08:53)</a>:</h4>
<p>does that <em>only</em> clean llvm?</p>



<a name="168118329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118329">(Jun 14 2019 at 08:54)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span>  fair; <code>clean --and-llvm</code> then</p>



<a name="168118397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118397">(Jun 14 2019 at 08:55)</a>:</h4>
<p>/me also thinks redundancy ain't a bad thing when it comes to a destructive options like cleaning.</p>



<a name="168118405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118405">(Jun 14 2019 at 08:55)</a>:</h4>
<p>like, I have my driver scripts set up to wait for five seconds if I issue the clean command</p>



<a name="168118407"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118407" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118407">(Jun 14 2019 at 08:55)</a>:</h4>
<p>o.O</p>



<a name="168118411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118411">(Jun 14 2019 at 08:55)</a>:</h4>
<p>sure, waiting five seconds is annoying, right?</p>



<a name="168118414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118414">(Jun 14 2019 at 08:55)</a>:</h4>
<p>but you know what's more annoying? accidentally issuing a clean command</p>



<a name="168118415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118415">(Jun 14 2019 at 08:55)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> yeah; I have a more YOLO approach to cleaning</p>



<a name="168118473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118473">(Jun 14 2019 at 08:56)</a>:</h4>
<p>admittedly part of this workflow stems from my use of Emacs compilation mode, where just hitting <code>g</code> will repeat the last compile-command that was used in the buffer</p>



<a name="168118482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118482">(Jun 14 2019 at 08:57)</a>:</h4>
<p>so that's a case where I want a reminder "oh, used a cleaning build the previous time, didn't mean to do that again"</p>



<a name="168118495"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118495" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118495">(Jun 14 2019 at 08:57)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span>  I don't think I've ever done an accidental <code>clean</code> but I do frequently do other silly things like touch a file in the compiler and incremental is a bit daft so it causes a rebuild of the compiler...</p>



<a name="168118501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118501">(Jun 14 2019 at 08:57)</a>:</h4>
<p>We definitely need to make incremental smarter</p>



<a name="168118504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118504">(Jun 14 2019 at 08:57)</a>:</h4>
<p>and/or make x.py smarter</p>



<a name="168118570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118570">(Jun 14 2019 at 08:58)</a>:</h4>
<p>I think making incremental smarter would help with a lot of existing problems we have</p>



<a name="168118580"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118580" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118580">(Jun 14 2019 at 08:58)</a>:</h4>
<p>(but we also need to improve the test suite for incremental; do more fuzzing and/or randomized test generation, in tandem with trying to ramp up effort on incremental.)</p>



<a name="168118697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118697">(Jun 14 2019 at 09:00)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> mmh; I've proposed to eddyb that we should add a (morally dubious) logic to incremental whereby we specifically hash post lexing so that whitespace changes, comment changes, and random saves don't cause rebuilds.</p>



<a name="168118724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118724">(Jun 14 2019 at 09:01)</a>:</h4>
<p>and you just suffer with incorrect spans?</p>



<a name="168118747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118747">(Jun 14 2019 at 09:01)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> kinda <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<a name="168118766"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118766" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118766">(Jun 14 2019 at 09:01)</a>:</h4>
<p>I was thinking more: Do rebuilds (so that span's get updated), but skip stuff like type-checking if the function only had changes of the form you mentioned</p>



<a name="168118826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118826">(Jun 14 2019 at 09:02)</a>:</h4>
<p>well <span class="user-mention" data-user-id="119009">@eddyb</span> has a principled solution for that I believe</p>



<a name="168118842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168118842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168118842">(Jun 14 2019 at 09:02)</a>:</h4>
<p>based on ranges or something</p>



<a name="168122461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168122461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168122461">(Jun 14 2019 at 10:03)</a>:</h4>
<p>I've definitely accidentally cleaned</p>



<a name="168122512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168122512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168122512">(Jun 14 2019 at 10:04)</a>:</h4>
<p>maybe adding a confirm y/n option would be helpful</p>



<a name="168122523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168122523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168122523">(Jun 14 2019 at 10:04)</a>:</h4>
<p>it's not used frequently enough that that would be annoying, I think</p>



<a name="168122901"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168122901" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168122901">(Jun 14 2019 at 10:10)</a>:</h4>
<p><code>x.py clean --and=llvm</code> could be more extensible, though I'm not sure what else we might want to clean</p>



<a name="168136449"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168136449" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168136449">(Jun 14 2019 at 13:51)</a>:</h4>
<p>hang on</p>



<a name="168136544"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168136544" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168136544">(Jun 14 2019 at 13:52)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> <span class="user-mention" data-user-id="126931">@centril</span> just to check, regarding removing the <code>llvm-finished-building</code>, I think it only triggers a rebuild if one is actually needed, and only exists because cmake is slow to do that check. is that so?</p>



<a name="168136611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168136611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168136611">(Jun 14 2019 at 13:53)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> the principled solution is either/both of 1. relative spans (the AST contains lengths instead of absolute positions) 2. token ranges instead of character ranges</p>



<a name="168136721"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168136721" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168136721">(Jun 14 2019 at 13:54)</a>:</h4>
<p>if only I had the time to do all this right away...</p>



<a name="168136877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168136877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168136877">(Jun 14 2019 at 13:56)</a>:</h4>
<p>considering compile times are something we're trying to improve this year, it seems that it would be a good idea to prioritise things like this</p>



<a name="168136909"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168136909" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168136909">(Jun 14 2019 at 13:56)</a>:</h4>
<p>(as a team, that is)</p>



<a name="168137170"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168137170" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168137170">(Jun 14 2019 at 14:00)</a>:</h4>
<p>I guess?</p>



<a name="168137701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168137701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168137701">(Jun 14 2019 at 14:06)</a>:</h4>
<p>okay well there might be enough sketched out in <span class="user-mention" data-user-id="119009">@eddyb</span> 's note above that I could write up a few sentences proposal for the next rustc planning meeting</p>



<a name="168141421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168141421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168141421">(Jun 14 2019 at 14:48)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> funny you say that...</p>



<a name="168141465"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168141465" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168141465">(Jun 14 2019 at 14:49)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> <a href="https://hackmd.io/zrZhb94HS6KxW3sguwXNqA#B-Mapping-back-to-originsource-can-be-impreciselossy" target="_blank" title="https://hackmd.io/zrZhb94HS6KxW3sguwXNqA#B-Mapping-back-to-originsource-can-be-impreciselossy">https://hackmd.io/zrZhb94HS6KxW3sguwXNqA#B-Mapping-back-to-originsource-can-be-impreciselossy</a></p>



<a name="168228043"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168228043" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mark-i-m <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168228043">(Jun 16 2019 at 00:00)</a>:</h4>
<p>Perhaps we could just change the user's code ourselves in some non-trivial way? Then we know it should be rebuilt, and that would simplify incremental tremendously...</p>



<a name="168228167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rebuild%20llvm/near/168228167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rebuild.20llvm.html#168228167">(Jun 16 2019 at 00:05)</a>:</h4>
<p>I want to fix up my build system so I won't need to do <code>x.py clean</code> or accidentally break build cache by switching between <code>x.py build</code> and <code>x.py check</code></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>